package com.neu.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.neu.base.BaseEntity;
import com.neu.utils.excel.EasyExcelConvert;
import com.neu.utils.excel.EnumFiledConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Schema(description = "项目实体")
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("project")
public class Project extends BaseEntity {
    /**
     * 项目ID
     */
    @TableId(type=IdType.ASSIGN_ID)
    @ExcelProperty(value = "项目ID")
    private String projectId;

    /**
     * 项目名称
     */
    @ExcelProperty(value = "项目名称")
    private String projectName;
    /**
     * 租户ID
     */
    @ExcelProperty(value = "租户ID")
    private String tenantId;

    /**
     * 项目编码
     */
    @ExcelProperty(value = "项目编码")
    private String projectCode;
    /**
     * 文件的访问地址
     */
    @ExcelIgnore
    private String url;

    /**
     * 项目建立日期
     */
    @ExcelProperty(value = "项目建立日期")
    private LocalDateTime startTime;

    /**
     * 项目状态   0 未评审  1 评审中  2 已通过 3 未通过
     */
    @ExcelProperty(value = "项目状态 ",converter = EasyExcelConvert.class)
    @EnumFiledConvert(enumMap = "0|未评审,1|评审中,2|已通过,3|未通过")
    private String projectStatus;
    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;
    /**
     * 项目最终评估成本
     */
    @ExcelProperty(value = "项目最终评估成本")
    private float cost;
    /**
     * 项目评估完成日期
     */
    @ExcelProperty(value = "项目评估完成日期")
    private LocalDateTime dueDate;


}
